﻿
Type Pass Extends BaseObject
	Field _gpupars:TList
	
	Method New()
		Self._gpupars = New TList
	End Method
	
rem
bbdoc: Sets the fragment program parameters. 
about: Only applicable to programmable passes. 
endrem
	Method getFragmentProgramParameters:GpuProgramParameters()
		Local pars:GpuProgramParameters
		Local p:Byte ptr = o_pass_getFragmentProgramParameters(Self._ptr)
		Local found:Byte = False
		
		If Self._gpupars <> Null
			For Local i:GpuProgramParameters = EachIn Self._gpupars
				If i._ptr = p
					found = True
					pars = i
					Exit
				End If
			Next
		End If
		
		If found = False
			pars = New GpuProgramParameters
			pars._ptr = p
			pars._typ = ET_NO_ENTITY
			Self._gpupars.AddLast(pars)
		EndIf
		
		Return pars
	End Method
	
rem
bbdoc: Process all dirty and pending deletion passes. 
endrem
	Method processPendingPassUpdates()
		o_pass_processPendingPassUpdates(Self._ptr)
	End Method
End Type